#ifndef _LUAPLAYER_H
#define _LUAPLAYER_H

class LUAMoney;
class LUAUnit;

class LUAPlayer
{
	GossipMenu* menu;
public:
	LUAPlayer() : menu(0), plr(0)
	{
	}
	Player* plr;
	void Broadcast(const char* string);
	const char* GetName() { if(plr) return plr->GetName(); else return ""; }
	void CreateGossipMenu(ui32 textid, LUAUnit unit);
	void AddGossipItem(ui32 icon, const char* text, ui32 cas);
	void SendGossipMenu();
	void GossipEnd() { if(plr) plr->GossipEnd(); if(menu) delete menu; menu = 0; }
	LUAMoney GetMoney();
	void SendPacket(LUAPacket packet) { if(plr) plr->GetSession()->SendPacket(&packet._data); }

	static scope RegisterLUAPlayer();
};

#endif